
#1. 确定CMake的最低版本需求
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)

#2. 确定工程名
PROJECT(ParserXeleSkt LANGUAGES CXX)
SET(CMAKE_CXX_STANDARD 11)

SET(SRC  
	${PROJECT_SOURCE_DIR}/ParserXeleSkt.cpp
	${PROJECT_SOURCE_DIR}/ParserXeleSkt.h
)

SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/build_${PLATFORM}/${CMAKE_BUILD_TYPE}/bin)

INCLUDE_DIRECTORIES(${INCS})
LINK_DIRECTORIES(${LNKS})
ADD_LIBRARY(ParserXeleSkt SHARED ${SRC})

IF(MSVC)
	SET(LIBS
		ws2_32
	)
ELSE(GNUCC)
	IF (WIN32)
		SET(LIBS
			boost_thread
			ws2_32
		)
	ELSE(UNIX)
		SET(LIBS
			boost_thread
		)
	ENDIF()
ENDIF()
TARGET_LINK_LIBRARIES(ParserXeleSkt ${LIBS})

IF (MSVC)
ELSE (GNUCC)
	SET_TARGET_PROPERTIES(ParserXeleSkt PROPERTIES
		CXX_VISIBILITY_PRESET hidden
		C_VISIBILITY_PRESET hidden
		VISIBILITY_INLINES_HIDDEN 1
        LINK_FLAGS_RELEASE -s)
ENDIF ()

